package bo;

import java.rmi.RemoteException;

public class InterventionDeplanifiee extends InterventionEtat{
    
        private final String libelle = "DE";

        @Override
        public synchronized boolean setInterventionEtat(Intervention intervention) throws RemoteException {
                if (intervention == null) {
                    return false;
                }
                if (!ListeInterventions.getInstance().contientIntervention(intervention)) {
                    return false;
                }
                //Seule une intervention Planifiee peut être Deplanifiee
                if (intervention.getStatut().getlibelle().contentEquals("PL")) {
                    return false;
                }
                return true;
        }
    
        public synchronized String getlibelle(){
                return this.libelle;
        }
}